<local:DocumentBase x:Class="WPFExcelReport.YCAFSSTAMM"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    Background="White" 
                    Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,0,0,65">
            <WrapPanel Width="1023" Height="38">
                <Label Content="{Binding Source={Localization:Translate Word=类别编号：}}"    Width="82" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTTYPE" Width="39" Margin="10,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="0" Text="{Binding Source={Localization:Translate Word=FC}}"
                         KeyUp="txtART_KeyUp"  CharacterCasing="Upper" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=款号：}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTICLE" Width="170" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="1"
                         Focusable="True" KeyUp="txtART_KeyUp" Background="YellowGreen" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=年份：}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOLL" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="4" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=波段：}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtREASON" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="3"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />

            </WrapPanel>
        </StackPanel>
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,37,0,28">
            <WrapPanel Width="1023">
                <Label Content="{Binding Source={Localization:Translate Word=大类：}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtPRDGRP" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="4"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=小类：}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTGRP" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="5"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="4" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=材质：}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtMATERIAL" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="6"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=采购员：}}"    Width="72" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtPURCHASER" Width="148" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="7"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=尺码组：}}"    Width="72" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSIZE" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="8"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
            </WrapPanel>
        </StackPanel>
        <StackPanel Margin="0,72,0,0" Grid.RowSpan="4" Grid.ColumnSpan="2">
            <WrapPanel >
                <Label Content="{Binding Source={Localization:Translate Word=国家标准：}}"    Width="83" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSTANDARD" Width="171" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="9"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="18" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=安全类别：}}"    Width="84" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSAFTY" Width="111" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="10"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="9" FontSize="18" Foreground="#FF141111" Height="33" />
                <Button Content="{Binding Source={Localization:Translate Word=查询款式资料}}" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="122" Panel.ZIndex="8"
                        Click="btnQuery_Click"/>
                <Button Content="{Binding Source={Localization:Translate Word=导出款式资料}}" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="122" Panel.ZIndex="9"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
            <WrapPanel>
                <DataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True" 
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  Width="1000"
                  Height="600"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               Grid.ColumnSpan="2" Margin="0,10,0,0" Grid.RowSpan="3" Grid.Row="1">
                    /*STYLE	STYLENAME	COLORNAME	SIZENAME	SALESPRICE	COSTPRICE	TYPE	TYPENAME	COLL	REASON	
        REASONNAME	PRDGROUP	PRDGRPNAME	ARTGROUP	ARTGRPNAME	MATERIAL	MATERIALNAME	COUNTRYSTANDARD	SAFTYNAME	
                    UNIT	CONTDATE	MARKDATE	PURCHASER   FSGRRAS   */
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=style}" Header="{Binding Source={Localization:Translate Word=款号}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=stylename}" Header="{Binding Source={Localization:Translate Word=款号描述}}" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=colorname}" Header="{Binding Source={Localization:Translate Word=颜色}}" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=sizename}" Header="{Binding Source={Localization:Translate Word=尺码}}" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=salesprice}" Header="{Binding Source={Localization:Translate Word=销售价}}" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=costprice}" Header="{Binding Source={Localization:Translate Word=成本价}}" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=type}" Header="{Binding Source={Localization:Translate Word=类型}}" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=typename}" Header="{Binding Source={Localization:Translate Word=类型名称}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=coll}" Header="{Binding Source={Localization:Translate Word=年份}}" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=reason}" Header="{Binding Source={Localization:Translate Word=季节}}" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=reasonname}" Header="{Binding Source={Localization:Translate Word=季节名称}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=prdgroup}" Header="{Binding Source={Localization:Translate Word=大类}}" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=prdgrpname}" Header="{Binding Source={Localization:Translate Word=大类名称}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=artgroup}" Header="{Binding Source={Localization:Translate Word=小类}}" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=artgrpname}" Header="{Binding Source={Localization:Translate Word=小类名称}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=material}" Header="{Binding Source={Localization:Translate Word=材质}}" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=materialname}" Header="{Binding Source={Localization:Translate Word=材质名称}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=countrystandard}" Header="{Binding Source={Localization:Translate Word=国家标准}}" Width="SizeToCells" MinWidth="80" />
                        <DataGridTextColumn Binding="{Binding Path=saftyname}" Header="{Binding Source={Localization:Translate Word=安全类型}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=contdate}" Header="{Binding Source={Localization:Translate Word=合同日期}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=markdate}" Header="{Binding Source={Localization:Translate Word=上市日期}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=purchaser}" Header="{Binding Source={Localization:Translate Word=采购员}}" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=fsgrras}" Header="{Binding Source={Localization:Translate Word=尺码组}}" Width="SizeToCells" MinWidth="30" />
                    </DataGrid.Columns>
                </DataGrid  >
            </WrapPanel>
        </StackPanel>
    </Grid>
</local:DocumentBase>
